{return_friendlink_list if_top="1" item=friendlink}
{return_friendlink_list cover="1" except_friendlink_id="`$friendlink_id`" item=friendlink_sub}
{return_friendlink_list except_friendlink_id="`$friendlink_id`,`$friendlink_sub_id`" item=friendlink_text}
{if ($friendlink|@is_array && $friendlink|@count > 0) || ($friendlink_sub|@is_array && $friendlink_sub|@count > 0) || ($friendlink_text|@is_array && $friendlink_text|@count > 0)}
<div class="out_table"><div class="space"></div></div>
<div class="out_table">
<table width="98%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
  <tr align="left" class="block_header">
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr align="left" class="block_header">
        <td>友情链接</td>
        <td width="20" align="center" nowrap><a href="{$control_index}?act=friendlink_list" target="_blank"><img src="{$dir_images}/icon_more.gif" border="0" alt="更多友情链接" title="更多友情链接"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr class="block_notice">
  <tr>
    <td align="left" nowrap>
      {if $friendlink|@is_array && $friendlink|@count > 0}
      <div id="friendlink">
        <ul>
        {foreach name=friendlink from=$friendlink item=item}
          <li>
          {if $dir_friendlink_cover|is_file:"`$item.cover_dir`/`$item.cover_filename`" == "1"}
          <table width="100%" border="0" cellspacing="0" cellpadding="1">
            <tr>
              <td width="88" rowspan="2" align="center" valign="top"><a href="{$control_index}?act=friendlink&friendlink_id={$item.id}" target="_blank"><img src="{$dir_friendlink_cover}/{$item.cover_dir}{$item.cover_filename}" width="88" height="31" border="0" alt="{$item.phrase|str_entag:'space,br'}" title="{$item.subject|str_entag:'space,br'}" /></a></td>
              <td align="left"><a href="{$control_index}?act=friendlink&friendlink_id={$item.id}" target="_blank" alt="{$item.phrase|str_entag:'space,br'}" title="{$item.subject|str_entag:'space,br'}"><b>{$item.phrase|str_entag:'space,br'}</b></a></td>
            </tr>
            <tr>
              <td align="left">{$item.brief|str_cut:0:36|str_entag:'space,br'}<br /><br /></td>
            </tr>
          </table>
          {else}
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left"><a href="{$control_index}?act=friendlink&friendlink_id={$item.id}" target="_blank" alt="{$item.phrase|str_entag:'space,br'}" title="{$item.subject|str_entag:'space,br'}"><b>{$item.phrase|str_entag:'space,br'}</b></a></td>
            </tr>
            <tr>
              <td align="left">{$item.brief|str_cut:0:50|str_entag:'space,br'}<br /><br /></td>
            </tr>
          </table>
          {/if}
          </li>
        {/foreach}
        </ul>
      </div>
      {/if}
      {if $friendlink_sub|@is_array && $friendlink_sub|@count > 0}
      <div id="friendlink_sub">
        <ul>
        {foreach name=friendlink_sub from=$friendlink_sub item=item}
          <li>{if $dir_friendlink_cover|is_file:"`$item.cover_dir`/`$item.cover_filename`" == "1"}<a href="{$control_index}?act=friendlink&friendlink_id={$item.id}" target="_blank"><img src="{$dir_friendlink_cover}/{$item.cover_dir}{$item.cover_filename}" width="88" height="31" border="0" alt="{$item.phrase|str_entag:'space,br'}" title="{$item.subject|str_entag:'space,br'}" /></a>{else}{$item.phrase|str_entag:'space,br'}{/if}</li>
        {/foreach}
        </ul>
      </div>
      {/if}
      {if $friendlink_text|@is_array && $friendlink_text|@count > 0}
      <div id="friendlink_text">
      {foreach name=friendlink_text from=$friendlink_text item=item}
        &nbsp;[<a href="{$control_index}?act=friendlink&friendlink_id={$item.id}" target="_blank" alt="{$item.phrase|str_entag:'space,br'}" title="{$item.subject|str_entag:'space,br'}">{$item.phrase|str_entag:'space,br'}</a>]
      {/foreach}
      </div>
      {/if}
    </td>
  </tr>
</table>
</div>
{/if}
